Modern electronic systems often require reliable power supplies. Large power currents may be switched on and off as various features or operations are performed, such as when a 3D graphics accelerator is enabled or disabled. GPS receivers and other portable electronics may require a very stable power source.
Sometimes a backup power supply is used in addition to a regular power supply. For example, a main power supply might use Direct Current (D.C.) generated by an external alternating-current (A.C.) adapter, while a battery provides the backup power. A power supply switch may be used to select either the main power supply or the backup power supply to power the system.
The power supply selector may monitor the voltages of both the main and backup power supplies and select the power supply with the higher voltage. When one power supply fails and its voltage falls below that of the other power supply, the power supply selector switches to the other power supply with the higher voltage. For example, diodes may be used to select the highest power-supply voltage. However, simple diodes do not allow for controlling the switching decision.
More complex control or monitoring may be provided to detect low-voltage situations or disconnected supplies. FIG. 1 shows a prior-art power-supply switch. Two power-supply voltages VDD1 and VDD2 are provided, such as from a main and a backup power supply. Comparator 12 compares these power supply voltages and drives the gates of switch transistors 14, 16 with switch control voltages VSW1, VSW2. Switch transistors 14, 16 select either VDD1 or VDD2 to drive the output supply voltage VDO to power the system.
A problem can occur when VDD1 and VDD2 are close to each other. Comparator 12 may not be able do distinguish between input voltages that are almost equal to one another when voltage drops cause various transient effects. Comparator 12 may enter an ambiguous state and drive both outputs VSW1 VSW2 to a same low state, causing both of switch transistors 14, 16 to be turned on at the same time. Then feed-through current can flow from one supply to the other supply, such as from VDD1, through switch transistor 16 to VDO, and then through switch transistor 14 to VDD2. As power-supply voltages fluctuate, this feed-through current can become large and may cause damage.
FIG. 2 shows another prior-art power-supply controller. Decision circuit 120 monitors VDD1 and VDD2 to drive VSW1 and VSW2 to control the gates of switch transistors 14, 16. Decision circuit 120 relies on some sort of feedback from output voltage VDO to decide which of VDD1 or VDD2 to select. This feedback can introduce stability issues and is thus undesirable.
While a power supply controller that selects the highest voltage are effective, unnecessary frequent switching may occur when the main and backup power supply voltages are near one another or fluctuate. For example, a main supply voltage may fluctuate from 3.3 volt down to 2.8 volt, and the system may be able to operate normally with this voltage range of 3.3 to 2.8 volts without any problems. However, if the backup supply is a constant 3.0 volts, the power supply controller may switch to the backup supply when the main supply drops below 3.0 volts. This switching is unnecessary since the system can operate down to 2.8 volts. This extra switching can cause glitches or other instability in the system and is undesirable.
What is desired is a power-supply selector that does not merely select the highest power-supply voltage. A power-supply selector circuit is desired that has a programmable voltage threshold. A power-supply selector circuit that continues to use the main power supply even when the backup supply has a higher voltage is desirable, but switches to the backup power supply only when the main supply voltage falls below the programmable threshold voltage. A digitally adjustable voltage threshold is desirable for setting the switching voltage.